package cn.com.api.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiSmslog;
import cn.com.api.entity.ApiT_member;
import cn.com.api.entity.ApiT_member_entrepreneur;
import cn.com.api.entity.ApiT_member_idcard;
import cn.com.api.entity.ApiT_member_task_process;
import cn.com.api.entity.ApiTmember;
import cn.com.api.entity.MemberObject;
import cn.com.api.entity.U_label;
import cn.com.api.entity.memberHomePage;
import cn.com.util.PageInfo;

@Service
public interface ApiMemberService {
	// 验证码--
	public String sendIdentifyCode(String cTel, int type) throws Exception;

	// 注册
	public ApiTmember regist(String path, ApiTmember member, ApiSmslog apiSmslog);

	// 登录
	public ApiTmember login(ApiTmember member);

	// 网站前端登陆
	public ApiTmember weblogin(ApiTmember member);

	// 根据用户cuserid返回用户信息
	public ApiTmember findMemberByCuserid(String cUserId);

	// 根据用户ID取用户信息，T_member表中的c_id字段
	public ApiTmember findMemberByCid(Integer cid);

	public boolean checkShopsExist(String cmobi);

	// 用户忘记密码
	public ApiTmember forgetCPass(ApiTmember member, ApiSmslog apiSmslog) throws Exception;

	// 修改用户信息
	public void modifyApiTmemberByCuserid(Map map);

	// 第三方登陆新加↓↓↓↓
	// 判断是否是第一次用第三方登陆
	public ApiTmember thirdLogin(ApiTmember apiTmember);

	public void thirdFirstLogin(String path, Map<String, String> params, Map<String, Object> map);

	public ApiTmember updateThirdMember(ApiTmember member);

	// 第三方登陆新加↑↑↑↑

	public List<ApiTmember> findT_membersByRole(Integer c_mtype);

	/** 注册、绑定手机号 校验手机号是否已注册绑定 */
	public ApiTmember checkMemberExist(String cUserId);

	/** 校验第三方账户是否已登录(存在) 类型+openid */
	public ApiTmember isExistThirdLogin(Map<String, String> params);

	public List<Map<String, Object>> searMemberByType(String type);

	public List<U_label> searchUserInfoExtend(Integer user_id, Integer type);

	// 验证密码
	public ApiTmember CheckUser(Integer u_id, String pwd);

	// 验证码直接登录
	public ApiTmember loginByCode(String path, ApiTmember member, ApiSmslog apiSmslog);

	// 根据认证编号获取人员信息
	public ApiTmember findMemberByPartnerCode(String partner_code);

	// 更新用户首媒号
	public ApiTmember updateSmcodeByUid(Integer u_id, String sm_code);

	// 获取用户主页信息 type 0:企业主 1：核伙人 2：自媒体
	// public memberHomePage getUserHomePageInfo(String user_id, Integer type);
	public memberHomePage getUserHomePageInfo(String user_id, Integer type, String my_id);

	// 查找用户
	public List<ApiTmember> findMemberByWords(String user_id, String word, PageInfo page);

	// 主页获取企业主列表
	public List<MemberObject> getEntrepreneursList(String referee_id, PageInfo page);

	// 主页获取核伙人列表
	public List<MemberObject> getPartnerList(String referee_id, PageInfo pageInfo);

	// 主页企业者列表查看企业信息
	public ApiT_member_entrepreneur getEntreInfo(String ent_id);

	// 核伙人任务信息
	public ApiT_member_task_process getMemberPartnerTaskInfo(String process_id);

	// 主页获取动态列表
	public List<MemberObject> getDynamicList(String user_id, PageInfo page);

	// 主页获取圈子列表
	public List<MemberObject> getCircleList(String user_id, PageInfo page);

	// 关注的人列表
	public List<ApiTmember> findFollowMemberList(String user_id, Integer type, PageInfo page);

	public void updatePwdByMobile(String mobile, String pwd);

	public ApiTmember checkPayPass(String userId, String pwd);

	// 微信领红包
	public Map<String, Object> wxreceivebonus(String cMob, String code, String bonus_detail_id) throws Exception;

	public void resetPayPwd(ApiTmember member, ApiSmslog apiSmslog) throws Exception;

	//注册新用户
	public Map<String, Object> registmember(ApiTmember member,
			ApiT_member_idcard idcard, ApiSmslog apiSmslog, String payimgurl) throws Exception;

	public Map<String, Object> getMemberInfoByMembercode(String membercode) throws Exception;

}
